package com.aspose.cells.a.d.a.a;

import java.awt.Font;
import java.awt.font.TextAttribute;
import java.io.IOException;
import java.util.Map;

public class zar {
   private int a;
   private int b;
   private int c;
   private int d;
   private int e;
   private boolean f;
   private boolean g;
   private boolean h;
   private int i;
   private int j;
   private int k;
   private int l;
   private int m;
   private String n;

   public zar(Font var1, Map<TextAttribute, ?> var2) {
      this.a = -var1.getSize();
      this.b = 0;
      this.c = 0;
      this.d = 0;
      this.e = var1.isBold() ? 700 : 400;
      this.f = var1.isItalic();
      if (var1.getAttributes().containsKey(TextAttribute.UNDERLINE)) {
         if (var1.getAttributes().get(TextAttribute.UNDERLINE) == TextAttribute.UNDERLINE_ON) {
            this.g = true;
         } else {
            this.g = false;
         }
      }

      if (var2 != null && var2.containsKey(TextAttribute.UNDERLINE) && var2.get(TextAttribute.UNDERLINE) == TextAttribute.UNDERLINE_ON) {
         this.g = true;
      }

      this.h = false;
      this.i = 0;
      this.j = 0;
      this.k = 0;
      this.l = 0;
      this.m = 0;
      this.n = var1.getName();
   }

   public int a() {
      int var1 = 0;
      if (this.e == 700) {
         var1 |= 1;
      }

      if (this.f) {
         var1 |= 2;
      }

      if (this.g) {
         var1 |= 4;
      }

      if (this.h) {
         var1 |= 8;
      }

      return var1;
   }

   public void a(com.aspose.cells.a.d.a.zb var1) throws IOException {
      var1.f(this.a);
      var1.f(this.b);
      var1.f(this.c);
      var1.f(this.d);
      var1.f(this.e);
      var1.b(this.f);
      var1.b(this.g);
      var1.b(this.h);
      var1.g(this.i);
      var1.g(this.j);
      var1.g(this.k);
      var1.g(this.l);
      var1.g(this.m);
      var1.a(this.n, 32);
   }
}
